package lc.inte;

public class Q1611 {

    public int[] divingBoard(int shorter, int longer, int k) {
        // 组成的长度，应该就是正好k+1个
        if (k == 0) {
            return new int[0];
        }
        if (shorter == longer) {
            return new int[]{shorter * k};
        }
        int[] result = new int[k + 1];
        for (int i = 0; i <= k; i++) {
            result[i] = shorter * (k - i) + longer * i;
        }
        return result;
    }

}
